package com.autoTest.common;

import org.openqa.selenium.chrome.ChromeDriver;

import java.time.Duration;

/**
 * Created with IntelliJ IDEA.
 * User:xieChao
 * Date:2023/2/20 13:58
 */
public class commonDriver {
    //创建驱动对象
    private  static ChromeDriver driver ;
    public static ChromeDriver getDriver(){
        if(driver == null){
            driver = new ChromeDriver();
            //隐式等待
            driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(3));
        }
        return driver;
    }
}
